<template>
  <view hover-class="hover" class="card_box" :style="{'background':backgroundColor}" :class="locale">
    <view class="background" :class="'background-'+locale">
      <image :src="backgroundImage" :style="[imageStyle]"/>
    </view>
    <view class="column card_content">
      <view :class="['title', 'title-'+locale]">
        {{ title }}
      </view>
      <view :class="['sub-title','sub-title-'+locale]">
        {{ subTitle }}
      </view>
      <view class="go" :style="{background:buttonColor} ">
        <view>GO</view>
        <image src="/static/icon/home/right.svg" style="width: 24rpx;height: 24rpx" :class="'go_icon-'+locale"></image>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  props: {
    backgroundColor: {
      type: String,
      default: 'linear-gradient(127deg, #2be2a0 -13.26%, #12c287 105.04%),linear-gradient(298deg, #117eff 3.79%, #6db0ff 83.85%), #d9d9d9;'
    },
    buttonColor: {
      type: String,
      default: 'linear-gradient(180deg, #20D596 0%, #19C98C 100%)'
    },
    title: {
      type: String,
      default: '微信文档'
    },
    subTitle: {
      type: String,
      default: '聊天记录文件'
    },
    backgroundImage: {
      type: String,
      default: '/static/icon/home/wechat.svg'
    },
    imageStyle: {
      type: Object,
      default: {
        width: '204rpx',
        height: '172rpx'
      }
    }
  },
  data() {
    return {};
  }
}
</script>

<style lang="scss">
.card_box {
  display: flex;
  position: relative;
  height: 248rpx;
  width: 100%;
  border-radius: 20rpx;
}

.background {
  position: absolute;
  bottom: -18rpx;
  right: 0;
}

.background-ug-CN {
  left: 0;
  transform: rotateY(180deg);
}

.card_content {
  padding: 32rpx;
  gap: 10rpx;
  flex: 1;
}

.title {
  color: white;
  font-size: 40rpx;
  word-Wrap: break-word;
}

.sub-title {
  opacity: 0.7;
  color: white;
  font-weight: 400;
  font-size: 24rpx;
}

.title-ug-CN {
  font-size: 32rpx;
}

.sub-title-ug-CN {
  font-size: 20rpx;
}

.go {
  gap: 10rpx;
  flex-direction: row;
  padding: 4rpx 14rpx;
  border-radius: 25rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  color: #FFFFFF;
  font-size: 26rpx;
  font-weight: 400;
  word-Wrap: break-word
}

.go_icon-ug-CN {
  transform: rotate(180deg);
}

</style>
